# -*- mode: python ; coding: utf-8 -*-

block_cipher = None

a = Analysis(
    ['app/project/doc_to_recommendation/prdt_doc_to_rec_md.py'],  # 使用确认的入口文件路径
    pathex=['/home/Feliks/Desktop/develop/prdt_doc_to_rec_manual'],
    binaries=[],
    datas=[
        # ('app/configs/*', 'app/configs'),
        # ('app/models/*', 'app/models'), # TODO 确认依赖无误后打包模型 
        # ('app/pdf_extract_kit/configs/*', 'app/pdf_extract_kit/configs'),
    ],
    # 确保包含所有依赖
    hiddenimports=[
        'concurrent_log_handler',
        'unimernet',
        # 添加 omegaconf 的隐藏依赖
        'omegaconf'
        'torchvision.io'
    ],
    hookspath=['./hook'],  # 添加 hook 目录
    hooksconfig={},
    runtime_hooks=['runtime-hooks/runtime-hook-paddle.py'],
    excludes=[],
    win_no_prefer_redirects=False,
    win_private_assemblies=False,
    cipher=block_cipher,
    noarchive=False,
)

pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)

exe = EXE(
    pyz,
    a.scripts,
    [],
    exclude_binaries=True,
    name='prdt_doc_to_rec_md',
    debug=False,
    bootloader_ignore_signals=False,
    strip=False,
    upx=True,
    console=True,
)

coll = COLLECT(
    exe,
    a.binaries,
    a.zipfiles,
    a.datas,
    strip=False,
    upx=True,
    upx_exclude=[],
    name='prdt_doc_to_rec_md',
)